package pers.hl.module_main.admin.lib

import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import com.amap.api.maps2d.MapView

class AMapLifecycleObserver(mapView: MapView) : DefaultLifecycleObserver {

    private val mMapView = mapView

    override fun onResume(owner: LifecycleOwner) {
        super.onResume(owner)
        mMapView.onResume()
    }

    override fun onPause(owner: LifecycleOwner) {
        super.onPause(owner)
        mMapView.onPause()
    }

    override fun onDestroy(owner: LifecycleOwner) {
        super.onDestroy(owner)
        mMapView.onDestroy()
    }
}
